<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>买家-收藏夹</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
    
	<?php if ($type=='pro') { ?>
    <div class="main-right">
    	<div class="my_collect_box">
        	<ul class="collect_box_hd">
            	<li class="on"><div class="collect_box_hd_rb"><a href="<?php echo $this->_url('user/favorite/?type=pro');?>"  style="color: #fff;">商品收藏</a></div></li>
                <li><div class="collect_box_hd_rb"><a href="<?php echo $this->_url('user/favorite/?type=shop');?>" style="color: #565656;">店铺收藏</a></div></li>
            </ul>
        </div>
        
        <div class="collect_boxs goods_collect">
        	<div class="dianpu_hd">
            	<table class="dianpu_hd_table">
                	<tr>
                    	<td class="dinfo2">商品图片</td>
                    	<td class="ginfo">商品信息</td>
                        <td class="renqi">收藏人气</td>
                        <td class="op">操作</td>
                    </tr>
                </table>
                
				
				<?php if(!empty($my_favorite['data'])) {
					foreach($my_favorite['data'] as $v) { ?>				
				
                <table class="dianpu_hd_table dianpu_list">
                	<tr>
                    	<td class="img"><img src="<?php echo  $v['goods_thumb'];?>"  onerror="this.src='<?php echo $this->_webroot('/user/images/nopic.gif'); ?>'" /></td>
                    	<td class="dinfo"><div class="name"><a href="<?php echo $this->_url('shop/productshow/'.$v['goods_id']);?>"><?php echo  $v['goods_name'];?></a></div></td>
                        <td class="ginfo" style="text-align: left;">商家:<a href="<?php echo $this->_url('shop/index/'.$v['shop_id']);?>" target="_blank"><?php echo  $v['shop_name'];?></a> <br/>收藏时间:<?php echo  $v['add_time'];?> <br/>价格:￥<span style="color: #E33F20; font-weight:bold;"><?php echo  $v['goods_price'];?></span></td>
                        <td class="renqi"><div class="num_div">收藏人气：<span class="num" style="color:red;"><?php echo  $v['favpv'];?></span></div></td>
                        <td class="op">
							<?php if($v['lock_flg']=='1') { ;?>
								<font color='red'>此商铺已经被锁定</font>
							<?php } elseif($v['open_flg']=='1') { ;?>
								<font color='red'>此商铺已经被关闭</font>
							<?php } else {?>
								<a href="<?php echo $this->_url('user/buyorderadress/');?>?gid=<?php echo  $v['goods_id'];?>&v=1">购买</a>
							<?php }?><br />
							<a href="<?php echo $this->_url('user/favoritedel/');?>?type=pro&id=<?php echo  $v['favorite_id'];?>" onclick="return confirm('确定要删除这条收藏吗？');">删除</a>						
						   </td>
                  </tr>
              </table>
  
                    <?php }?>
                <?php  }?>  

          </div>
            
           <div class="clear"></div>
            <div class="collect_page"><span><?php echo $my_favorite['page']['current']['num'];?>/<?php echo $my_favorite['page']['pageCount'];?></span>
			<a href="<?php echo $my_favorite['page']['prevPage'];?>">上一页</a>
			<a href="<?php echo $my_favorite['page']['nextPage'];?>">下一页</a> 到第 <input class="cinputPage" type="text" /> 页 <input class="cpageGoto" type="button" value="跳转" /></div>
        </div>
        
    </div>
	<?php } else if ($type=='shop') { ?>
	
    <div class="main-right">
    	<div class="my_collect_box">
        	<ul class="collect_box_hd">
            	<li><div class="collect_box_hd_rb"><a href="<?php echo $this->_url('user/favorite/?type=pro');?>" style="color: #565656;">商品收藏</a></div></li>
                <li class="on"><div class="collect_box_hd_rb"><a href="<?php echo $this->_url('user/favorite/?type=shop');?>" style="color: #fff;">店铺收藏</a></div></li>
            </ul>
        </div>
        
        <div class="collect_boxs goods_collect">
        	<div class="dianpu_hd">
            	<table class="dianpu_hd_table">
                	<tr>
                    	<td class="dinfo2">店铺logo</td>
                    	<td class="ginfo">店铺信息</td>
                      
                        <td class="op">操作</td>
                    </tr>
                </table>
                
				
				<?php if(!empty($shop_favorite['data'])) {
					foreach($shop_favorite['data'] as $v) {?>				
				
                <table class="dianpu_hd_table dianpu_list">
                	<tr>
                    	<td class="img">
								<?php  if($v['shop_logo']){?>
										<img src="<?php echo  $v['shop_logo'];?>" width="80" height="80"  onerror="this.src='<?php echo $this->_webroot('/user/images/nopic.gif'); ?>'" >
								<?php  } else{?>
										<img src="<?php echo $this->_webroot('/user/images/nopic.gif'); ?>" width="80" height="80" >
								<?php }?>						
						</td>
                    	<td class="dinfo"><div class="name"><a href="<?php echo $this->_url('shop/index/'.$v['shop_id']);?>" target="_blank"><?php echo  $v['shop_name'];?></a></div></td>
                        <td class="ginfo" style="text-align: left;">简介:&nbsp;&nbsp;<?php echo  $v['shop_intro'];?></td>
                       
                        <td class="op">
							 <?php if($v['lock_flg']=='1') {;?>
								 	<font color='red'>此商铺已经被锁定</font><br />
							 <?php }?>
							 <?php if($v['open_flg']=='1') {;?>
								 	<font color='red'>此商铺已经被关闭</font><br />
							 <?php }?>
								<a href="<?php echo $this->_url('user/favoritedel/');?>?type=shop&id=<?php echo  $v['favorite_id'];?>" onclick="return confirm('确定要删除这条收藏吗？');">删除</a><br />
						   </td>
                  </tr>
              </table>
  
                    <?php }?>
                <?php  }?>  

          </div>
            
           <div class="clear"></div>
            <div class="collect_page"><span><?php echo $shop_favorite['page']['current']['num'];?>/<?php echo $shop_favorite['page']['pageCount'];?></span>
			<a href="<?php echo $shop_favorite['page']['prevPage'];?>">上一页</a>
			<a href="<?php echo $shop_favorite['page']['nextPage'];?>">下一页</a> 到第 <input class="cinputPage" type="text" /> 页 <input class="cpageGoto" type="button" value="跳转" /></div>
        </div>
        
    </div>	
	
	<?php } ?>
	
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />
</div>
</body>
</html>